package com.example.yoga.service.impl;

import com.example.yoga.entity.User;
import com.example.yoga.entity.VipCardVo;
import com.example.yoga.mapper.UserMapper;
import com.example.yoga.service.IUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author liwenkai
 * @since 2021-02-01
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public List<VipCardVo> getAllVipCardList() {
        List<VipCardVo> allVipCardList = userMapper.getAllVipCardList();
        return allVipCardList;
    }

    @Override
    public int getTotalUser() {
        int totalUser = userMapper.getTotalUser();
        return totalUser;
    }
}
